<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Hash;
use DB;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class layoutController extends Controller
{
   public function header()
   {
    // 获取分类显示header
    $cates =  cateController::getCatesByPid(0);

    $lbpic = DB::table('lbpic')->get();
    
    //查询友链
    $friend = DB::table('friend')->get();
    //获取友链的总个数
    $num = count($friend);

    // 解析模板
    return view('home.layout.header',['cates'=>$cates,'friend'=>$friend,'num'=>$num,'lbpic'=>$lbpic]);

   }
}  
 